# -*- coding: utf-8 -*-
"""
    @project: pythonProject
    @Author：HanYonghua
    @file： redis_test_send.py
    @date：2025/4/23 17:56
    @blogs: https://www.ncatest.com.cn
"""
import redis

r = redis.StrictRedis(host='127.0.0.1', port=6379, db=0)
r.set('foo', 'bar')
a = r.get('foo')

chunk_size = 1024 * 1024  # 1MB
with open('wifi4_demod_lib.rar', 'rb') as f:
    while True:
        chunk = f.read(chunk_size)
        if not chunk:
            break
        r.rpush('file_chunks', chunk)  # 追加到列表

r.close()
